home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / dshiftr.z / dshiftr
Encoding:
Text File  |  1998-10-30  |  5.0 KB  |  113 lines

  1. DSHIFTR(3I)                                            Last changed: 2-5-98
  2.  
  3.  
  4. NNAAMMEE
  5.      __ddsshhiiffttrr, DDSSHHIIFFTTRR - Performs a double-object right shift
  6.  
  7. SSYYNNOOPPSSIISS
  8.      C/C++:
  9.  
  10.      ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
  11.      lloonngg __ddsshhiiffttrr ((lloonngg _i,, lloonngg _j,, lloonngg _k));;
  12.  
  13.      Fortran:
  14.  
  15.      DDSSHHIIFFTTRR (([II==]_i,, [JJ==]_j,, [KK==]_k))
  16.  
  17. IIMMPPLLEEMMEENNTTAATTIIOONN
  18.      C/C++:  UNICOS and UNICOS/mk systems
  19.  
  20.      Fortran:  UNICOS, UNICOS/mk, and IRIX systems
  21.  
  22. SSTTAANNDDAARRDDSS
  23.      C/C++:  Cray Research extension
  24.  
  25.      Fortran:  CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
  26.      90
  27.  
  28. DDEESSCCRRIIPPTTIIOONN
  29.      The __ddsshhiiffttrr and DDSSHHIIFFTTRR functions perform a double-object right
  30.      shift.  They return a single object.
  31.  
  32.      This result is derived from two arguments, _i and _j.  The arguments are
  33.      as follows:
  34.  
  35.      _i    The upper bits of the double object.  Must be of type integer.
  36.  
  37.      _j    The lower bits of the double object.  Must be of the same type
  38.           and size as _i.
  39.  
  40.      _k    The number of bits to be shifted.  Must be of type integer.
  41.  
  42.      The __ddsshhiiffttrr and DDSSHHIIFFTTRR functions return a value generated by a right
  43.      double-shift of the rightmost _k bits of _i into the leftmost _k bits of
  44.      _j.  If both the _i and _j arguments specify the same word in memory, a
  45.      rotated shift occurs.  The value of _k must be in the range of 0
  46.      through 64 for __ddsshhiiffttrr.
  47.  
  48. CC//CC++++ NNOOTTEESS
  49.      Because __ddsshhiiffttrr is an intrinsic function, no externally visible
  50.      library function is available for it.  The compiler generates inline
  51.      code to produce the result.
  52.  
  53. FFOORRTTRRAANN NNOOTTEESS
  54.      On UNICOS systems, _i and _j are 64-bit objects.  On UNICOS/mk systems,
  55.      _i and _j can be 32- or 64-bit objects.  On IRIX systems, _i and _j can be
  56.      8-, 16-, 32-, or 64-bit objects.
  57.  
  58.      When shifting 64-bit quantities, _i makes up bits 64 through 127 of the
  59.      double object.  The function result is the 64-bit string beginning
  60.      with bit 64-_k; that is, its rightmost bit is _k bits from the double
  61.      object's right end.  The value of _k must be 0 <= _k <= 64.
  62.  
  63.      When shifting 32-bit quantities, _i makes up bits 32 through 63 of the
  64.      double object.  The function result is the 32-bit string beginning
  65.      with bit 32-_k; that is, its rightmost bit is _k bits from the double
  66.      object's right end.  The value of _k must be 0 <= _k <= 32.
  67.  
  68.      When shifting 16-bit quantities, _i makes up bits 16 through 31 of the
  69.      double object.  The function result is the 16-bit string beginning
  70.      with bit 16-_k; that is, its rightmost bit is _k bits from the double
  71.      object's right end.  The value of _k must be 0 <= _k <= 16.
  72.  
  73.      When shifting 8-bit quantities, _i makes up bits 8 through 15 of the
  74.      double object.  The function result is the 8-bit string beginning with
  75.      bit 8-_k; that is, its rightmost bit is _k bits from the double object's
  76.      right end.  The value of _k must be 0 <= _k <= 8.
  77.  
  78.      Arguments are not altered in their original storage unless the result
  79.      represents the same address as either _i or _j, as in the Fortran
  80.      assignment MM == DDSSHHIIFFTTRR((MM,, NN,, 55)).
  81.  
  82.      For more information on storage units, see the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e
  83.      _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905.
  84.  
  85.      DDSSHHIIFFTTRR is an elemental function.  The name of this intrinsic cannot
  86.      be passed as an argument.
  87.  
  88. RREETTUURRNN VVAALLUUEESS
  89.      __ddsshhiiffttrr returns a 64-bit integer result.
  90.  
  91.      DDSSHHIIFFTTRR returns a typeless result on UNICOS and UNICOS/mk systems and
  92.      an integer result on IRIX systems.  The size of the result is the size
  93.      of the arguments _i and _j.
  94.  
  95. EEXXAAMMPPLLEESS
  96.      The following figure shows a shift of two 64-bit quantities:
  97.  
  98.                     Double word shifts right by _k bits -->
  99.  
  100.            127        _i             64 63        _j              0
  101.           |___________________________|__________________________|
  102.                       |--------result----------|--------_k--------|
  103.  
  104. SSEEEE AALLSSOO
  105.      A complete list of C/C++ intrinsic functions available on Cray
  106.      Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication
  107.      SR-2179.
  108.  
  109.      _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905
  110.  
  111.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  112.      printed version of this man page.
  113.